package com.yonyou.pmclouds.businessobject.util;

public class BusinessObjectUtils {

    /**
     *  把以字符分割的字符串转化为sql格式
     * @param arrayId
     * @param sepSign
     * @return
     */
    public static String parseSql(String arrayId, String sepSign) {
        if(arrayId == null || arrayId.length() <= 0) {
            return "9988776655443321";
        }
        StringBuilder stringBuilder = new StringBuilder();
        String[] arrayStr = arrayId.split(sepSign);
        for(String str : arrayStr) {
            stringBuilder.append(",'").append(str).append("'");
        }
        String ret = stringBuilder.toString();
        ret = ret.substring(1);
        return ret;
    }
}
